<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">

</head>
<body>
<div id="exam">
    <el-alert th:title="${session.student.name}+' 正在答题...'" type="success" :closable="false">
    </el-alert>
    <el-form :model="answers" :rules="ruleAnswers" ref="answers">
    <el-card class="box-card" v-for="(o,index) in questions" :key="o.id">
        <div slot="header" class="clearfix">
            <span>{{o.question}}</span>
        </div>
        <el-form-item :prop="'id'+index">
		<el-radio-group v-model="answers['id'+index]" size="medium">
			<el-radio v-for="item in o.answer.split(';;;')" :key="item" :label="item" border>{{item}}</el-radio>
		</el-radio-group>
        </el-form-item>
    </el-card>

    <el-button type="success" round @click="submitPaper">交卷</el-button>
    </el-form>
</div>
<!-- 先引入 Vue -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript" th:src="@{/js/exam.js}"></script>
</body>
</html>
